function convexhull, points, alpha, auto_alpha=auto_alpha, aux_data_points=aux_data_points
	hull_path = "D:\sjwelch\IDL\hull.exe"
	hull_file = 'D:\sjwelch\code\sandbox\invertices.txt'
	hull_output_postfix='-alf'
	hull_command = hull_path + ' -oN -afOFF ' + (keyword_set(auto_alpha) ? '-A' : '-aa' + strtrim(alpha,2)) + ' -i' + hull_file
	print, hull_command
	;make each vertex a string
	str_points = strarr(n_elements(points[0,*]))
	com = ""

	for i=0, n_elements(points[0,*]) - 1 do begin
		str_points[i] = strtrim(strcompress(string(points[0,i]) + ' ' + string(points[1,i]) + ' ' + string(points[2,i]))); + string(13b); + string(11b)
		com = com + str_points[i]
	endfor

	openw, unit, hull_file, /get_lun
	printf, unit, FORMAT='((A))', str_points
	close, unit
	free_lun, unit

	spawn, hull_command, /hide

	;now faces will be in .\inverts.txt-alf
	OPENR, unit, hull_file + hull_output_postfix, /GET_LUN
	faces = lonarr(100000) ; won't need all that space
	count = 0
	somestring = ""
	READF, unit, FORMAT='((A))', somestring
	while NOT(EOF(unit)) do begin
		v1 = 0
		v2 = 0
		v3 = 0
		READF, unit, v1, v2, v3
		faces[count:count+3] = [3, v1, v2, v3]	;each face a triangle, no quads
		count+=4
	endwhile
	close, unit
	free_lun, unit
	faces[count] = -1
	faces = faces[0:count]

	;now make a IDLitVisPolygon out of them

	;some random colouring
	colour = randomu(systime(1), 3) * 255

	vis = obj_new('IDLitVisPolygon')
	vis-> setproperty, data=(keyword_set(aux_data_points) ? aux_data_points : points), polygons=faces, $
		name=(arg_present(alpha) ? 'Alphashape: ' + strtrim(alpha,2) : "Alphashape")
	vis -> setproperty, linestyle=6, fill_background=1, fill_color=colour, color=colour, noClose=0, shading=0
	return, vis
end